You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/11/15 15:21:26 UTC
[GitHub] [spark] yaooqinn commented on a change in pull request #26537:
[SPARK-29587][SQL] Support SQL Standard type real as float(4) numeric as
decimal
yaooqinn commented on a change in pull request #26537: [SPARK-29587][SQL] Support SQL Standard type real as float(4) numeric as decimal
URL: https://github.com/apache/spark/pull/26537#discussion_r346873638
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -2154,17 +2154,17 @@ class AstBuilder(conf: SQLConf) extends SqlBaseBaseVisitor[AnyRef] with Logging
case ("smallint" | "short", Nil) => ShortType
case ("int" | "integer", Nil) => IntegerType
case ("bigint" | "long", Nil) => LongType
- case ("float", Nil) => FloatType
+ case ("float" | "real", Nil) => FloatType
Review comment:
2. mimer_sql_engine
https://download.mimer.com/pub/developer/docs/html_100/Mimer_SQL_Engine_DocSet/Syntax_Rules4.html#wp1228955
Data Type | Abbrevi-ation | Description | Range
-- | -- | -- | --
DECIMAL(p,s) | DEC(p,s) | Exact numerical,precision p, scale s. | 1 <= p <= 450 <= s <= p
NUMERIC(p,s) | N/A | Exact numerical, precision p, scale s.(Same as DECIMAL). | 1 <= p <= 450 <= s <= p
FLOAT(p) | N/A | Approximate numerical,mantissa precision p. | 1 <= p <= 45Zero or absolute value10-999 to 10+999
REAL | N/A | Approximate numericalmantissa precision 7. | Zero or absolute value10-38 to 10+38Corresponds to a single precision float.
FLOAT | N/A | Approximate numericalmantissa precision 16. | Zero or absolute value10-308 to 10+308Corresponds to a double precision float.
DOUBLE PRECISION | N/A | Approximate numericalmantissa precision 16. | Zero or absolute value10-308 to 10+308
> Note: In Mimer SQL the NUMERIC data type is exactly equivalent to DECIMAL.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org