[SQL] [MINOR] Skip unresolved expression for InConversion

Author: scwf <wangfei1@huawei.com>

Closes #6145 from scwf/InConversion and squashes the following commits:

5c8ac6b [scwf] minir fix for InConversion
This commit is contained in:
scwf 2015-05-17 15:17:11 +08:00 committed by Cheng Lian
parent 1a7b9ce80b
commit edf09ea1bd

View file

@ -296,6 +296,9 @@ trait HiveTypeCoercion {
*/
object InConversion extends Rule[LogicalPlan] {
def apply(plan: LogicalPlan): LogicalPlan = plan transformAllExpressions {
// Skip nodes who's children have not been resolved yet.
case e if !e.childrenResolved => e
case i @ In(a, b) if b.exists(_.dataType != a.dataType) =>
i.makeCopy(Array(a, b.map(Cast(_, a.dataType))))
}