Skip to content
Snippets Groups Projects
Commit d6dc603e authored by gatorsmile's avatar gatorsmile Committed by Wenchen Fan
Browse files

[SPARK-19441][SQL] Remove IN type coercion from PromoteStrings

### What changes were proposed in this pull request?
The removed codes for `IN` are not reachable, because the previous rule `InConversion` already resolves the type coercion issues.

### How was this patch tested?
N/A

Author: gatorsmile <gatorsmile@gmail.com>

Closes #16783 from gatorsmile/typeCoercionIn.
parent cb2677b8
No related branches found
No related tags found
No related merge requests found
......@@ -335,15 +335,6 @@ object TypeCoercion {
if left.dataType != StringType =>
p.makeCopy(Array(left, Cast(right, left.dataType)))
case i @ In(a @ DateType(), b) if b.forall(_.dataType == StringType) =>
i.makeCopy(Array(Cast(a, StringType), b))
case i @ In(a @ TimestampType(), b) if b.forall(_.dataType == StringType) =>
i.makeCopy(Array(a, b.map(Cast(_, TimestampType))))
case i @ In(a @ DateType(), b) if b.forall(_.dataType == TimestampType) =>
i.makeCopy(Array(Cast(a, StringType), b.map(Cast(_, StringType))))
case i @ In(a @ TimestampType(), b) if b.forall(_.dataType == DateType) =>
i.makeCopy(Array(Cast(a, StringType), b.map(Cast(_, StringType))))
case Sum(e @ StringType()) => Sum(Cast(e, DoubleType))
case Average(e @ StringType()) => Average(Cast(e, DoubleType))
case StddevPop(e @ StringType()) => StddevPop(Cast(e, DoubleType))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment