aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst
diff options
context:
space:
mode:
authorWenchen Fan <cloud0fan@outlook.com>2015-06-08 11:52:02 -0700
committerReynold Xin <rxin@databricks.com>2015-06-08 11:52:02 -0700
commitfe7669d3072b72954ad0c3f2f8846a0fde839ead (patch)
tree896b7e69c9ad582fa870588dc09d15f64e346838 /sql/catalyst
parentbbdfc0a40fb39760c122e7b9ce80aa1e340e55ee (diff)
downloadspark-fe7669d3072b72954ad0c3f2f8846a0fde839ead.tar.gz
spark-fe7669d3072b72954ad0c3f2f8846a0fde839ead.tar.bz2
spark-fe7669d3072b72954ad0c3f2f8846a0fde839ead.zip
[SQL][minor] remove duplicated cases in `DecimalPrecision`
We already have a rule to do type coercion for fixed decimal and unlimited decimal in `WidenTypes`, so we don't need to handle them in `DecimalPrecision`. Author: Wenchen Fan <cloud0fan@outlook.com> Closes #6698 from cloud-fan/fix and squashes the following commits: 413ad4a [Wenchen Fan] remove duplicated cases
Diffstat (limited to 'sql/catalyst')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala6
1 files changed, 0 insertions, 6 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala
index a42ffce0d2..737905c358 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala
@@ -445,12 +445,6 @@ trait HiveTypeCoercion {
e2 @ DecimalType.Expression(p2, s2)) if p1 != p2 || s1 != s2 =>
val resultType = DecimalType(max(p1, p2), max(s1, s2))
b.makeCopy(Array(Cast(e1, resultType), Cast(e2, resultType)))
- case b @ BinaryComparison(e1 @ DecimalType.Fixed(_, _), e2)
- if e2.dataType == DecimalType.Unlimited =>
- b.makeCopy(Array(Cast(e1, DecimalType.Unlimited), e2))
- case b @ BinaryComparison(e1, e2 @ DecimalType.Fixed(_, _))
- if e1.dataType == DecimalType.Unlimited =>
- b.makeCopy(Array(e1, Cast(e2, DecimalType.Unlimited)))
// Promote integers inside a binary expression with fixed-precision decimals to decimals,
// and fixed-precision decimals in an expression with floats / doubles to doubles