-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-9069] [SPARK-9264] [SQL] remove unlimited precision support for DecimalType #7605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c9c7c78
1779bde
788631c
8d783cc
4c28969
06727fd
df93657
bfaae35
fb0d20d
aa3f115
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -322,7 +322,10 @@ class SqlParser extends AbstractSparkSQLParser with DataTypeParser { | |
|
|
||
| protected lazy val numericLiteral: Parser[Literal] = | ||
| ( integral ^^ { case i => Literal(toNarrowestIntegerType(i)) } | ||
| | sign.? ~ unsignedFloat ^^ { case s ~ f => Literal((s.getOrElse("") + f).toDouble) } | ||
| | sign.? ~ unsignedFloat ^^ { | ||
| // TODO(davies): some precisions may loss, we should create decimal literal | ||
| case s ~ f => Literal(BigDecimal(s.getOrElse("") + f).doubleValue()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is different from our offline discussion, isn't it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will break some tests, so I'd like to do it separately, https://issues.apache.org/jira/browse/SPARK-9281?filter=-2. |
||
| } | ||
| ) | ||
|
|
||
| protected lazy val unsignedFloat: Parser[String] = | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add javadoc here; can you also add javadoc for the one above?