Yin Huai created SPARK-12373: -------------------------------- Summary: Type coercion rule for dividing two decimal values may choose an intermediate precision that does not enough number of digits at the left of decimal point Key: SPARK-12373 URL: https://issues.apache.org/jira/browse/SPARK-12373 Project: Spark Issue Type: Bug Components: SQL Reporter: Yin Huai
Looks like the {{widerDecimalType}} at https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala#L432 can produce something like {{(38, 38)}} when we have have two operand types {{Decimal(38, 0)}} and {{Decimal(38, 38)}}. We should take a look at if there is more reasonable way to handle precision/scale. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org